package com.magima.utils;

import java.util.LinkedHashMap;

/**
 * Created by magima on 14-12-25.
 */
public class MaxSizeHashMap<K,V> extends LinkedHashMap<K,V> {
    private int mSize;
    public MaxSizeHashMap(int size){
        mSize = size;
    }

    @Override
    protected boolean removeEldestEntry(Entry<K, V> eldest) {
        return this.size() > mSize;
    }
}
